<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script>
//		var pattern = /good/ig; 
//		var str = 'good good study!，day day up!';
//		console.log(str.match(pattern)); 
//		console.log(str.match(pattern).length); 
//		var pattern = /good/ig;
//		var str = 'good good study!，day day up!';
//		console.log(str.search(pattern));
//		
//		var str="500000"
//		console.log(/^[1-9]\d{5}$/.test(str))
//		
//		/^.+\.(zip|gz|rar|tar)$/
//		
//		str.replace(/\s+/g,"")
//		
//		str.replace(/^\s+/,"").replace(/\s+$/,"")
	//	/^[1-9]\d{5}$/
//		/^.+\.(zip|gz|rar|7z|tar)$/
		var str="    dfsad     asdfs      "

//		console.log(str.replace(/\s+/g,""))
//		var p=/[pla]/
//		var str="plain"
//		console.log(str.match(p))
//
//		console.log(str.replace(/^\s+/,"").replace(/\s+$/,""))
//		/^\w+@\w+(\.\w+)+$/
//		/1(3|4|5|7|8)\d{9}/
//		/\d{17}(\d|X)/
//		/\d{4}([-\/\.]\d{2}){2}/
//		/[\u2E80-\u9FFF]/
//		/^[a-zA-z_]\w{5,14}$/
//		str.replace(/b[aeio]g/g,"bug")
//var a=1
//var b=2
//var c=3
//		var foo=function(a,b,c){
//			//console.log(a,b,c)zx csa
//		}
var str="foo(a,b,c)"
		
		console.log(str.replace(/foo\(([^,]+),([^,]),([^\)])\)/,"foo($2,$1,$3)"))
		
		
		str.replace(/(really\s)+/g,"very ")
		
	 
		
	</script>
	<body>
	</body>
</html>
